package com.qf.day05;

import java.lang.reflect.Array;
import java.util.Arrays;

public class CatUtile {
    String breed;
    String color;
    int age;
    String name;
    String sex;
    int happy;
    int weight;
    //全参构造
    public CatUtile(String breed, String color, int age, String name, String sex, int happy, int weight) {
        this.breed = breed;
        this.color = color;
        this.age = age;
        this.name = name;
        this.sex = sex;
        this.happy = happy;
        this.weight = weight;
    }
    //单参
    public CatUtile(String name) {
        this.name = name;
    }
    //无参
    public CatUtile() {
    }
    public void eat(){
        this.weight+=5;
        this.happy+=1;
        System.out.println(this.name+"在吃饭"+"吃胖了体重"+this.weight+"吃开心了:"+this.happy);
    }
    public void sleep(){
        this.weight-=1;
        this.happy+=1;
        System.out.println(this.name+"猫在吃饭"+"谁瘦了体重:"+this.weight+"睡开心了:"+this.happy);
    }
    public void getFish(){
        this.happy+=1;
        System.out.println(this.name+"在捕猎开心心情为:"+this.happy);
    }
    public void backflip(){
        this.weight-=2;
        System.out.println(this.name+"在后空翻瘦了:"+this.weight);
    }
    public void sort(int[] x){
        System.out.println(this.name+"在冒泡排序");
        Arrays.sort(x);

    }

}
